import type { KnowledgeDetail, Category } from '@/types/knowledge';
import { allKnowledgeCards as javaKnowledgeCards, basicKnowledge, oopKnowledge, coreKnowledge, advancedKnowledge, java8Knowledge, jvmKnowledge, patternKnowledge } from './java/index';
import { allKnowledgeCards as sqlKnowledgeCards, basicKnowledge as sqlBasicKnowledge, queryKnowledge, dmlKnowledge, advancedQueryKnowledge, joinKnowledge, optimizationKnowledge, transactionKnowledge, procedureKnowledge } from './sql/index';

/**
 * 知识点分类数据（按技术栈分组）
 */
export const categories: Category[] = [
	// Java分类
	{ id: 'basic', name: 'Java基础语法', icon: '📝' },
	{ id: 'oop', name: '面向对象编程', icon: '🎯' },
	{ id: 'core', name: 'Java核心API', icon: '🔧' },
	{ id: 'advanced', name: '高级特性', icon: '🚀' },
	{ id: 'java8', name: 'Java 8+ 新特性', icon: '⚡' },
	{ id: 'jvm', name: 'Java内存模型与JVM', icon: '💻' },
	{ id: 'pattern', name: '设计模式', icon: '🎨' },
	// SQL分类
	{ id: 'sql-basic', name: 'SQL基础语法', icon: '📝' },
	{ id: 'sql-query', name: '数据查询', icon: '🔍' },
	{ id: 'sql-dml', name: '数据操作', icon: '✏️' },
	{ id: 'sql-advanced-query', name: '高级查询', icon: '🚀' },
	{ id: 'sql-join', name: '表连接与关联', icon: '🔗' },
	{ id: 'sql-optimization', name: '索引与优化', icon: '⚡' },
	{ id: 'sql-transaction', name: '事务与锁', icon: '🔒' },
	{ id: 'sql-procedure', name: '存储过程与函数', icon: '💻' }
];

/**
 * 所有知识点数据（按分类合并）- 包含完整详情
 * 注意：这里只导出Java的知识点，SQL的知识点需要根据技术栈单独获取
 */
export const allKnowledgeCards: KnowledgeDetail[] = [
	...javaKnowledgeCards,
	...sqlKnowledgeCards
];

/**
 * 导出所有知识点数据
 */
export { basicKnowledge, oopKnowledge, coreKnowledge, advancedKnowledge, java8Knowledge, jvmKnowledge, patternKnowledge };
export { sqlBasicKnowledge, queryKnowledge, dmlKnowledge, advancedQueryKnowledge, joinKnowledge, optimizationKnowledge, transactionKnowledge, procedureKnowledge };

